home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / cp2dekit / h / binfcach.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-29  |  957 b   |  41 lines

  1. //***************************************************************************
  2. //
  3. // this file is (c) '94-'96 Niklas Beisert
  4. //
  5. // this file is part of the cubic player development kit.
  6. // you may only use/modify/spread this file under the terms stated
  7. // in the cubic player development kit accompanying documentation.
  8. //
  9. //***************************************************************************
  10.  
  11. #ifndef __CBINFILE_H
  12. #define __CBINFILE_H
  13.  
  14. #include "binfile.h"
  15.  
  16. class binfilecache : public binfile
  17. {
  18. protected:
  19.   binfile *f;
  20.   char *buffer;
  21.   int buflen;
  22.   int bufpos;
  23.   int bufread;
  24.   long filebufpos;
  25.   int dirty;
  26.   long fileseekpos;
  27.   void invalidatebuf();
  28.  
  29. public:
  30.   binfilecache();
  31.  
  32.   int open(binfile &fil, int len);
  33.   virtual void close();
  34.   virtual long read(void *buf, long len);
  35.   virtual long write(const void *buf, long len);
  36.   virtual long seek(long pos);
  37.   virtual long chsize(long pos);
  38. };
  39.  
  40. #endif
  41.